<include file="Public:header"/>


        <!--body wrapper start-->
        <div class="wrapper">
			<!--主播列表 start-->
			<div class="row">
                <div class="col-sm-12">
                <section class="panel">
                <header class="panel-heading">
                    <a href="{:U('Games/games',array(gid=>$gid,fid=>1))}" style="color:#65CEA7;">主播列表</a>
                    <a href="{:U('Games/games',array(gid=>$gid,fid=>2))}" style="color:#666;">比赛列表</a>
                    <!--<span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
					</span>-->
                </header>
                <div class="panel-body">
                <div class="adv-table editable-table ">
                <div class="clearfix">
                    <div class="btn-group">
						<a href="#addmyModal" data-toggle="modal" >
							<button class="btn btn-primary ">
								添加 <i class="fa fa-plus"></i>
							</button>
                        </a>
						<a href="{:U('Games/games_changetime')}" target="_blank" >
							变时间
                        </a>

                    </div>
                    <!--<div class="btn-group pull-right">
                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Tools <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="#">Export to Excel</a></li>
                        </ul>
                    </div>-->
                </div>
                <div class="space15"></div>
                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                <thead>
                <tr>
                    <th>排序</th>
                    <th>ID</th>
                    <th>名称</th>
                    <th>主播</th>
                    <th>平台LOGO</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
					<volist name="list" id="l" >
						<tr class="">
							<td>{$l.displayOrder}</td>
							<td>{$l.gameId}</td>
							<td>{$l.name}</td>
							<td>{$l.tname1}</td>
							<td><img src="{$l.ptlogo}" height="40" /></td>
							<td>
								<a class="tan_edit" data-toggle="modal" href="#bianjibox{$l.gameId}">编辑</a>
								|
								<a target="_blank" href="{:U('Games/game_ju',array(fid=>$l[fenlei],gid=>$l[game_typeId],gameid=>$l[gameId]))}">管理</a>
								|
								<php>
								if($l['state']==1){
								</php>
									<a href="javascript:;" onclick="del_admin({$l.gameId},'games',this,'gameId')">删除</a>
								<php>
								}else{
								</php>
									<a href="javascript:;" onclick="hui_admin({$l.gameId},'games',this,'gameId')">恢复</a>
									|
									<a href="javascript:;" class="cddel_admin_btn" onclick="cddel_admin({$l.gameId},'games',this,'gameId')">彻底删除</a>
								<php>
								}
								</php>
							</td>
						</tr>
						<!--编辑框 start-->
						<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="bianjibox{$l.gameId}" class="modal fade">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h4 class="modal-title">编辑</h4>
									</div>
		
									<div class="modal-body ">
										<form action="{:U('Games/games_edit')}" method="post">
											<input type="hidden" name="id" value="{$l.gameId}">
											<input type="hidden" name="game_typeId" value="{$_GET.gid}">
											<input type="hidden" name="fenlei" value="{$_GET.fid}">
											<div class="form-group">
												<label>名称</label>
												<input name="name" value="{$l.name}" class="form-control">
											</div>
											<div class="form-group">
												<label>主播</label>
												<select name="team1_teamId" class="form-control">
													<volist name="tupian" id="t">
														<option value="{$t.teamId}"  <php>if($t['teamId']==$l['team1_teamId']){</php>selected="selected"<php>}</php>>{$t.name}</option>
													</volist>
												</select>
											</div>
											<div class="form-group">
												<label>平台LOGO</label>
												<select name="ptid" class="form-control">
													<volist name="pingtai" id="p">
														<option value="{$p.id}"  <php>if($p['id']==$l['ptid']){</php>selected="selected"<php>}</php>>{$p.name}</option>
													</volist>
												</select>
											</div>
											<div class="form-group">
												<label>排序</label>
												<input name="displayOrder" value="{$l.displayOrder}" class="form-control">
											</div>
											<button type="submit" class="btn btn-primary">保存</button>
										</form>
									</div>
		
								</div>
							</div>
						</div>
						<!--编辑框 end-->
					</volist>

                </tbody>
                </table>
                </div>
                </div>
                </section>
                </div>
			</div>
			<!--主播列表 end-->
		</div>
        <!--body wrapper end-->
		<!--添加框 start-->
		<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="addmyModal" class="modal fade">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
						<h4 class="modal-title">添加</h4>
					</div>
					<div class="modal-body">
						<form action="{:U('Games/games_edit')}" method="post">
							<input type="hidden" name="id" value="">
							<input type="hidden" name="game_typeId" value="{$_GET.gid}">
							<input type="hidden" name="fenlei" value="{$_GET.fid}">
							<div class="form-group">
								<label>名称</label>
								<input name="name" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>主播</label>
								<select name="team1_teamId" class="form-control">
									<volist name="tupian" id="t">
										<option value="{$t.teamId}">{$t.name}</option>
									</volist>
								</select>
							</div>
							<div class="form-group">
								<label>平台LOGO</label>
								<select name="ptid" class="form-control">
									<volist name="pingtai" id="p">
										<option value="{$p.id}">{$p.name}</option>
									</volist>
								</select>
							</div>
							<div class="form-group">
								<label>排序</label>
								<input name="displayOrder" value="" class="form-control">
							</div>
							<button type="submit" class="btn btn-primary">保存</button>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!--添加框 end-->

    </div>
    <!-- main content end-->
	
<include file="Public:footer"/>

